package functional

import (
	"fmt"
	"strings"
	"time"
)

func Request(url string, respHandler func(res string, err error), afterHandler func(url interface{}, resp interface{})) {
	fmt.Println("通过地址获取响应信息")
	upper := strings.ToUpper(url)
	time.Sleep(2 * time.Second)
	respHandler(upper, nil)
	defer afterHandler(url, upper)
}
